import com.alibaba.fastjson.JSON;
import com.apex.ams.AmsConfigure;
import com.apex.ams.util.AasCommService;
import com.apex.ams.utils.PropertiesValueProvider;
import com.apexsoft.aas.service.model.ARequest;
import com.apexsoft.aas.service.model.AResponse;

import java.io.IOException;
import java.util.HashMap;
import java.util.Properties;

public class Test {
    public static void main(String... args) throws IOException {
        Properties properties = new Properties();
        properties.load(Test.class.getClassLoader().getResourceAsStream("ams.properties"));
        AmsConfigure configure  = AmsConfigure.getInstance();
        configure.setValueProvider(new PropertiesValueProvider(properties));



        ARequest request =  new ARequest();
        request.setParams(new HashMap<String,Object>(){{
            put("name","test");
        }});
        AResponse response = AasCommService.sendRequest("test", "abc.service1", request);
        System.out.println(JSON.toJSON(response));

    }
}
